This effect is used to combine two images using the alpha channels of the images to control the blending. It provides for the standard alpha blending options, and can handle pre-multiplying by any color, although white and black are most common, and will often be faster.
The alpha compositor effect takes a maximum of two sources and has two parameters.
If the BlendMode is "Pre-multiply Alpha", this parameter contains the color used in the pre-multiply blend, otherwise it is ignored. |
The Blend Mode parameter can contain one of the following values:
DestinationRed = PreMultiplyRed * (1-alphaC) + temp1 * alphaC
DestinationGreen = PreMultiplyGreen * (1-alphaC) + temp2 * alphaC
DestinationBlue = PreMultiplyBlue * (1-alphaC) + temp3 * alphaC
alphaC = alphaB + (1-alphaB) * alphaA
temp1 = (alphaA * SourceARed + alphaB * sourceBRed)/alphaC
temp2 = (alphaA * SourceAGreen + alphaB * sourceBGreen)/alphaC
temp3 = (alphaA * SourceABlue + alphaB * sourceBBlue)/alphaC
| Previous | Chapter contents | Chapter top | Section top | Next |